Skip to content

DLPX-96594 fix linux-kernel-generic upstream merge for 6.17#388

Closed
lyriclake wants to merge 1 commit intodevelopfrom
dlpx/pr/lyriclake/512b6eee-2f55-49da-b0ba-5bc2fe9eb09e
Closed

DLPX-96594 fix linux-kernel-generic upstream merge for 6.17#388
lyriclake wants to merge 1 commit intodevelopfrom
dlpx/pr/lyriclake/512b6eee-2f55-49da-b0ba-5bc2fe9eb09e

Conversation

@lyriclake
Copy link

@lyriclake lyriclake commented Feb 26, 2026

Problem

After updating to kernel 6.17, linux-kernel-generic was failing to build the perf tool with:

15:14:09 mmap.c: In function ‘perf_mmap__read’:
15:14:09 mmap.c:217:38: error: invalid use of undefined type ‘union perf_event’
15:14:09 217 | if (diff >= (int)sizeof(event->header)) {
15:14:09 | ^~
15:14:09 mmap.c:221:29: error: invalid use of undefined type ‘union perf_event’
15:14:09 221 | size = event->header.size;
15:14:09 | ^~
15:14:09 mmap.c:223:40: error: invalid use of undefined type ‘union perf_event’
15:14:09 223 | if (size < sizeof(event->header) || diff < (int)size)
15:14:09 | ^~
15:14:09 make[5]: *** [/export/home/delphix/jenkins/workspace/linux-pkg/develop/build-package/linux-kernel-generic/pre-push/linux-pkg/packages/linux-kernel-generic/tmp/repo/debian/build/tools-perarch/tools/build/Makefile.build:86: /export/home/delphix/jenkins/workspace/linux-pkg/develop/build-package/linux-kernel-generic/pre-push/linux-pkg/packages/linux-kernel-generic/tmp/repo/debian/build/tools-perarch/tools/perf/libperf/mmap.o] Error 1

Solution

I did not root-cause the perf compilation failure. However, in default-package-config.sh we have:
   # do_tools_common=false
   #   We do not need to build linux-tools-common package and we
   #   install it directly from our package mirror.

We don't have any custom modifications to perf, and it is provided by linux-tools-common, so we don't need to be building it. This PR adds do_tools_perf=false.

Testing Done

https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/13331/

@lyriclake lyriclake force-pushed the dlpx/pr/lyriclake/512b6eee-2f55-49da-b0ba-5bc2fe9eb09e branch 2 times, most recently from c73de93 to becd38a Compare February 26, 2026 22:09
@lyriclake lyriclake marked this pull request as ready for review February 26, 2026 22:17
Copy link

@dbjwhs-perforce dbjwhs-perforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit boy in the house.

@lyriclake lyriclake force-pushed the dlpx/pr/lyriclake/512b6eee-2f55-49da-b0ba-5bc2fe9eb09e branch from becd38a to 150606a Compare February 26, 2026 22:36
@sebroy
Copy link
Contributor

sebroy commented Mar 5, 2026

I thought that while the perf tool's wrapper is delivered by that common package, there is a perf component that must be built with the kernel in order for the perf tool to work (otherwise that perf wrapper can't find the kernel artifacts to use in the filesystem).

I could be wrong, but maybe this doubt can be put to rest by testing that on an appliance with a 6.17 kernel built with this change, the perf binary works as expected.

@lyriclake
Copy link
Author

I thought that while the perf tool's wrapper is delivered by that common package, there is a perf component that must be built with the kernel in order for the perf tool to work (otherwise that perf wrapper can't find the kernel artifacts to use in the filesystem).

I could be wrong, but maybe this doubt can be put to rest by testing that on an appliance with a 6.17 kernel built with this change, the perf binary works as expected.

I think you are correct here, thanks for pointing this out. Doing the test you suggest we see:

delphix@ip-10-110-246-204:~$ perf
WARNING: perf not found for kernel 6.17.0-1007

Luckily, in the course of testing this I also noticed that for whatever reason, linux-kernel-generic seems to be compiling successfully without this change now.. i.e., the error that prompted this PR no longer occurs. So I think it is safe to close this PR and merge the kernel changes without it.

@lyriclake lyriclake closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants